package com.demo.common.web.interceptor;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.AsyncHandlerInterceptor;

import com.demo.common.util.RequestContext;

/**
 * GlobalInterceptor
 * 
 * @author demo
 * @date 2020-11-13 00:56:10
 */
@Component
public class GlobalInterceptor implements AsyncHandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        RequestContext.init(request, response);
        return true;
    }

}
